#ifndef __PANEL_H
#define __PANEL_H

#ifdef __cplusplus
 extern "C" {
#endif
   
#include "UConfig.h"
#include "Board.h"

#if(BOARD_TYPE == BOARD_STM32L4R9I_DISCOVERY)
	#include "stm32l4xx_hal_ltdc.h"
#else
	#include "stm32h7xx_hal_ltdc.h"
#endif


typedef struct{
	uint32_t	DriverType;
	uint32_t	HSPolarity;
	uint32_t	VSPolarity;
	uint32_t	DEPolarity;
	uint32_t	PCPolarity;
	uint32_t	HSync;   
	uint32_t	VSync;  
	uint32_t	HBP;  
	uint32_t	VBP;   
	uint32_t	ActiveW;
	uint32_t	ActiveH;    
	uint32_t	HFP;        
	uint32_t	VFP;      
	uint32_t	Backcolor;                 /*!< Configures the background color. */

	uint32_t	PLL2M;
	uint32_t	PLL2N;
}Lcd_TypeDef;


void SendData(uint8_t cmd,uint8_t data);
void Lcd_DSIShortWrite(uint32_t Mode,uint32_t Param1,uint32_t Param2);
void Lcd_DSILongWrite(uint32_t Mode,uint32_t NbParams,uint32_t Param1,uint8_t *ParamTable);

#if(LCD_PANEL_TYPE == LCD_390X390_1_2INCH)
	#include "LCD_390X390_1_2INCH.h"	
	
#else
	#error "No Panel"
#endif

#ifdef __cplusplus
}
#endif
#endif
